<?php


namespace app\admin\controller\base;


use app\admin\service\base\StudentService;
use app\BaseController;
use think\response\Json;

class Student extends BaseController
{
    /**
     * 班级列表
     * @return Json
     */
    public function index(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->index($params);
    }

    /**
     * 导出学生列表
     * @return Json
     */
    public function indexExport(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->indexExport($params);
    }

    /**
     * 班级列表
     * @return Json
     */
    public function setAttrs(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->setAttrs($params);
    }

    /**
     * 导入学生
     * @param StudentService $studentService
     * @return Json
     * @throws \Exception
     */
    public function import(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->import($params);
    }

    /**
     * 导入设置分组
     * @param StudentService $studentService
     * @return Json
     * @throws \Exception
     */
    public function importSetAttrs(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->importSetAttrs($params);
    }

    /**
     * 导入test
     * @param StudentService $studentService
     * @return Json
     * @throws \Exception
     */
    public function import2(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->import2($params);
    }

    /**
     * 导入专业年级和班级
     * @param StudentService $studentService
     * @return Json
     * @throws \Exception
     */
    public function import3(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->import3($params);
    }

    /**
     * 详情
     * @param StudentService $studentService
     * @return Json
     */
    public function read(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->read($params);
    }

    /**
     * 创建班级
     * @return Json
     */
    public function save(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->save($params);
    }

    /**
     * 更新班级信息
     * @return Json
     */
    public function update(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->update($params);
    }


    /**
     * 删除班级信息
     * @return Json
     */
    public function delete(StudentService $studentService):Json
    {
        $params = request()->param();
        return $studentService->delete($params);
    }
}